### 分页模板函数，两个参数含义分别为：Page 对象，分页前方的链接
#define FrontPaginate(page,link)
#setLocal(currentPage = page.pageNumber, totalPage = page.totalPage)
#if(totalPage < 2 || currentPage > totalPage)
	#return
#end

#setLocal(startPage = currentPage - 3)
#if(startPage < 1)
	#setLocal(startPage = 1)
#end

#setLocal(endPage = currentPage + 3)
#if(endPage > totalPage)
	#setLocal(endPage = totalPage)
#end
	<ul class="pagination justify-content-center">
	#if(currentPage > 1)
		<li class="page-item">
			<a class="page-link" href="#(link)#(currentPage - 1)" aria-label="Previous">
				<span aria-hidden="true">&laquo;</span>
				<span class="sr-only">Previous</span>
			</a>
		</li>
    #else
		<li class="page-item disabled">
			<a class="page-link" href="#" aria-label="Previous">
				<span aria-hidden="true">&laquo;</span>
				<span class="sr-only">Previous</span>
			</a>
		</li>
	#end
	#if(currentPage - 3 > 1)
		<li class="page-item"><a class="page-link" href="#(link)1">1</a></li>
	#end
	#for(i : [startPage..endPage])
	#if(currentPage == i)
		<li class="page-item active"><a class="page-link">#(i)</a></li>
	#else
		<li class="page-item"><a class="page-link" href="#(link)#(i)">#(i)</a></li>
	#end
	#end
	#if(currentPage + 3 < totalPage)
		<li class="page-item"><a class="page-link" href="#(link)#(totalPage)">#(totalPage)</a></li>
	#end
	#if(currentPage < totalPage)
		<li class="page-item">
			<a class="page-link" href="#(link)#(currentPage + 1)" aria-label="Next">
				<span aria-hidden="true">&raquo;</span>
				<span class="sr-only">Next</span>
			</a>
		</li>
	#end
	</ul>
#end
